// 引入request.js
import request from '../utils/request';

// 用户登录接口
const userLogin = (data) => request({ url: '/users/login', method: 'POST', data });
// 获取用户权限列表
const getUserInfo = () => request({ url: '/users/getPermissionList', method: 'GET' });
// 所有用户信息列表
const getallList = () => request({ url: '/users/all/list', method: 'GET' });
// 获取用户列表
const getUserList = (data) => request({ url: '/users/list', method: 'GET', data });
// 用户删除接口
const removeUser = (data) => {
  return request({url:'/users/delete',method:'POST',data})
}
// 用户创建接口
const addUser = (data) => {
  return request({url:'/users/operate',method :'POST',data})
}
// 导出user相关的接口
export default {
  userLogin,
  addUser,
  getUserInfo,
  getallList,
  removeUser,
  getUserList,
};
